package com.example.consumer018080.service;

import com.example.consumer018080.bean.Depart;
import com.example.consumer018080.service.DepartService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import java.util.Arrays;
import java.util.List;

@Component
@Slf4j
public class DepartFallBackFactory implements DepartService {


    @Override
    public boolean save(Depart depart) {
        log.info("=========执行保存异常服务降级处理========");
        return false;
    }

    @Override
    public boolean del(int id) {
        return false;
    }

    @Override
    public boolean update(Depart depart) {
        return false;
    }

    @Override
    public Depart query(int id) {
        return null;
    }

    @Override
    public List<Depart> findAll() {
        log.info("=========执行查询异常服务降级处理========");
        return null;
    }

    @Override
    public String getInfo() {
        return "获取信息出错啦";
    }

}
